﻿@using ProjectThuCung.Models

@if (LoaiSanPham.loaisanpham != null)
{
    <h4>Các loại thú cưng</h4>
    <ul id ="menusidebar">
        @foreach (var item2 in LoaiSanPham.loaisanpham)
        {
            if (item2.SubLoaiSanPham == SubLoaiSP.ThuCung)
            {
                <li style ="font-weight:bold">@Html.ActionLink(item2.TenLoaiSanPham,item2.SubLoaiSanPham.ToString(),"SanPham",new { loaisanpham = item2.TenLoaiSanPham, phanloai = item2.LoaiSanPhamID},null)</li>
            }
        }
    </ul>
    <h4>Thức ăn</h4>
    <ul>
        @foreach (var item2 in LoaiSanPham.loaisanpham)
        {
            if(item2.SubLoaiSanPham == SubLoaiSP.ThucAn)
            {
                <li style ="font-weight:bold">@Html.ActionLink(item2.TenLoaiSanPham,item2.SubLoaiSanPham.ToString(),"SanPham",new { loaisanpham = item2.TenLoaiSanPham, phanloai = item2.LoaiSanPhamID},null)</li>
            }
        }
    </ul>
    <h4>Thuốc</h4>
    <ul>
        @foreach (var item2 in LoaiSanPham.loaisanpham)
        {
            if (item2.SubLoaiSanPham == SubLoaiSP.Thuoc)
            {
                <li style ="font-weight:bold">@Html.ActionLink(item2.TenLoaiSanPham,item2.SubLoaiSanPham.ToString(),"SanPham",new {loaisanpham = item2.TenLoaiSanPham,phanloai = item2.LoaiSanPhamID},null)</li>
            }
        }
    </ul>
    <h4>Đồ chơi cho thú cưng</h4>
    <ul>
        @foreach (var item2 in LoaiSanPham.loaisanpham)
        {
            if (item2.SubLoaiSanPham == SubLoaiSP.DoChoi)
            {
                <li style ="font-weight:bold">@Html.ActionLink(item2.TenLoaiSanPham,item2.SubLoaiSanPham.ToString(),"SanPham",new { loaisanpham = item2.TenLoaiSanPham, phanloai = item2.LoaiSanPhamID },null)</li>
            }
        }
    </ul>
    <h4>Chuồng trại</h4>
    <ul>
        @foreach (var item2 in LoaiSanPham.loaisanpham)
        {
            if (item2.SubLoaiSanPham == SubLoaiSP.Chuong)
            {
                <li style ="font-weight:bold">@Html.ActionLink(item2.TenLoaiSanPham,item2.SubLoaiSanPham.ToString(),"SanPham",new { loaisanpham = item2.TenLoaiSanPham, phanloai = item2.LoaiSanPhamID },null)</li>
            }
        }
    </ul>
}